#ifndef _MCP2515_CAN_Rx_Tx_H
#define _MCP2515_CAN_Rx_Tx_H
#include "main.h"

 #pragma pack (1)
typedef struct 
{  
		void (*initial)(u8 par1,u8 par2); 
}void_function_call1;
 #pragma pack (1)
typedef struct
{
	  u32 StdId;                                                               
    u32 ExtId;                                                             
    u8 IDT;                                                                    
    u8 RTR;                                                                   
    u8 DLC;                                                           
    u8 Data[8];                                                                     
} Can_Msg;

extern u8 CAN_MCP2515_Send_Buffer(Can_Msg* TxMessage,u8 CAN_Channel);
extern unsigned char CAN_MCP2515_Receive_Buffer(CAN_RxTx* RxMessage,u8 CAN_Channel);

extern u8 CAN_MCP2515_SID_Send_Buffer(Can_Msg* TxMessage,u8 CAN_Channel);
extern u8 CAN_MCP2515_EXID_Send_Buffer(Can_Msg* TxMessage,u8 CAN_Channel);

extern void_function_call1 CAN_MCP2515_writebaty_table[5];

extern unsigned char CAN_MCP2515_Receive_Buffer2(CAN_RxTx* RxMessage,u8 CAN_Channel);

extern u8 CAN_MCP2515_Abnormal_Pro(void);
#endif

